﻿//-----------------------------------------------------------------------
// <copyright>
// This file is subject to the terms and conditions of the Microsoft Public License (MS-PL).
// See http://www.microsoft.com/opensource/licenses.mspx#Ms-PL for more details.
// </copyright>
//----------------------------------------------------------------------- 
using System;
using System.Collections.Generic;

namespace Fulcrum
{
    public abstract class GenerationUnit
    {
        protected GenerationUnit(string name)
        {
            if (String.IsNullOrEmpty(name))
            {
                throw new ArgumentException("The name can't be null or empty.", "name");
            }

            this.Name = name;
        }

        public string Name
        {
            get;
            private set;
        }

        public ISettings Settings
        {
            get;
            protected set;
        }

        public virtual void CreateDataContexts()
        {
            // nothing
        }

        abstract public ICollection<GenerationDataContext> DataContexts
        {
            get;
        }

    }
}
